package top.saodisheng.impl;

import top.saodisheng.IHello;
import top.saodisheng.entity.User;

import java.util.List;
import java.util.Map;

/**
 * Description:
 *
 * @author 扫地生_saodisheng
 * @date 2021/06/25
 */
public class IHelloImpl implements IHello {
    @Override
    public String sayHello(String name) {
        return "Hello " + name;
    }

    @Override
    public String getUserList(List<User> users) {
        StringBuffer userString = new StringBuffer();
        for (User user : users) {
            userString.append(user.toString());
        }

        return userString.toString();
    }

    @Override
    public String getUserMap(Map<String, User> maps) {
        StringBuffer userString = new StringBuffer();
        for (Map.Entry e : maps.entrySet()) {
            userString.append(e.getValue());
        }
        return userString.toString();
    }
}
